/**
 * Alipay.com Inc.
 * Copyright (c) 2004-2016 All Rights Reserved.
 */
package com.alipay.study;

import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;

import com.alipay.study.filter.ConsumerFilter;

/**
 * @SpringCloudApplication 此注解整合了  @SpringBootApplication、@EnableDiscoveryClient、@EnableCircuitBreaker
 * @EnableZuulProxy 申明此应用是一个zuul网关服务应用
 * @author zijin
 * @version $Id: ZuulApplication.java, v 0.1 2016年11月19日 下午2:51:43 zijin Exp $
 */
@EnableZuulProxy
@SpringCloudApplication
public class ZuulApplication {
    /**
     * 应用入口
     * 
     * @param args
     */
    public static void main(String[] args) {
        SpringApplication.run(ZuulApplication.class, args);
    }

    /**
     * 添加拦截器
     * 
     * @return com.alipay.study.filter.ConsumerFilter
     */
    @Bean
    public ConsumerFilter consumerFilter() {
        return new ConsumerFilter();
    }
}
